/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.stat;

import android.text.TextUtils;
import org.json.JSONObject;

public class k {
    private static String g = "LevelBean";
    public String a = "";
    public long b = 0L;
    public long c = 0L;
    public long d = -1L;
    public int e = 0;
    public String f = "";

    public k() {}

    public k(String paramString, int paramInt) {
        this.a = paramString;
        this.b = ai.o();
        this.e = paramInt;
    }

    public k(String paramString1, int paramInt, String paramString2) {
        this.a = paramString1;
        this.b = ai.o();
        this.e = paramInt;
        this.f = paramString2;
    }

    public JSONObject a() {
        JSONObject localJSONObject = new JSONObject();
        try {
            localJSONObject.put("name", this.a);
            localJSONObject.put("status", this.e);
            localJSONObject.put("begin", this.b);
            if (0L != this.c) {
                localJSONObject.put("end", this.c);
                localJSONObject.put("duration", this.d);
                if (!(TextUtils.isEmpty(this.f)))
                    localJSONObject.put("reason", this.f);
            }
        } catch (Exception localException) {
            x.a(g, localException);
        } catch (Error localError) {
            x.a(g, localError);
        }
        return localJSONObject;
    }
}